package game.breeze.gameserver.controller;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import game.breeze.gameserver.IUpdatable;

public abstract class ContainerController implements IUpdatable {
	protected Map<String, PlayerController> controllers = new ConcurrentHashMap<String, PlayerController>();

	/**
	 * 添加英雄到容器
	 * 
	 * @param controller
	 */
	public void addController(PlayerController controller) {
		controllers.put(controller.getPlayer().getUuid(), controller);
		onControllerAdded(controller);
	}

	/**
	 * 添加添加到容器
	 * 
	 * @param controller 玩家
	 */
	public abstract void onControllerAdded(PlayerController controller);
}
